
/* 重新名称游览器title */
export function settingName(toPath){
  let documentName = [...toPath.matched].map(item => {
    return item.meta.title
  }).filter(Boolean).join('-')
  return documentName
}

/* 为元素绑定事件 */
export function addMouseEvent(el, event, callBack){
  if(this.$refs[el] !== undefined){
    this.$refs[el].addEventListener(event, callBack)
  }
}

export function removeMouseEvent(el, event, callBack){
  if(this.$refs[el] !== undefined){
    this.$refs[el].removeEventListener(event, callBack)
  }
}